(function(){
	var servletBuilder = Packages.io.undertow.servlet.Servlets.deployment()
			        .setClassLoader(Jse.class.getClassLoader())
			        .setContextPath("/")
			        .setDeploymentName(Jse.name)
			        .addServlets(
			        		Packages.io.undertow.servlet.Servlets.servlet("JseServlet", com.jse.jakarta.JseServlet.class)
			                        .addInitParam("server", "undertow")
			                        .addMapping("/"));
			var manager = Packages.io.undertow.servlet.Servlets.defaultContainer().addDeployment(servletBuilder);
			manager.deploy();
			var path = Packages.io.undertow.Handlers.path(Packages.io.undertow.Handlers.redirect("/"))
			        .addPrefixPath("/", manager.start());
			var server = Packages.io.undertow.Undertow.builder()
			        .addHttpListener(Jse.conf.get("server.port")||80, "localhost")
			        .setHandler(path)
			        .build();
			server.start();
})()